<?php		
class Reason_Form_Reason_Detail extends Zend_Form
{
	public function __construct(Zend_Controller_Action $controller)
	{
		//reason_inbound_type
		$reason_inbound_type=$this->createElement ( 'select', 'reason_inbound_type' )
		->setLabel ( $controller->getHelper('common')->getCaption('reason_inbound_type' ))
		->setDescription ( $controller->getHelper('common')->getDescription('reason_inbound_type' ))
		->setMultiOptions(array(0=>'Nhập',1=>'Xuất'))
		->setAttrib ( 'class','numeric lock' )
		;
		
		//reason_warehouse_group_code
		$reason_warehouse_group_code=$this->createElement ( 'select', 'reason_warehouse_group_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('reason_warehouse_group_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('reason_warehouse_group_code' ))
		->setAttrib ( 'class','lock' )
		;
		
		//reason_content
		$reason_content=$this->createElement ( 'textarea', 'reason_content' )
		->setLabel ( $controller->getHelper('common')->getCaption('reason_content' ))
		->setDescription ( $controller->getHelper('common')->getDescription('reason_content' ))
		->setAttrib ( 'class','lock' )
		;
		
		//reason_use_company
		$reason_use_company=$this->createElement ( 'select', 'reason_use_company' )
		->setLabel ( $controller->getHelper('common')->getCaption('reason_use_company' ))
		//->setDescription ( $controller->getHelper('common')->getDescription('reason_use_company' ))
		->setMultiOptions(array(1=>'Có',0=>'Không'))
		->setAttrib ( 'class','numeric lock' )
		;
		
		//reason_code
		$reason_code=$this->createElement ( 'text', 'reason_code' )
		->setLabel ( $controller->getHelper('common')->getCaption('reason_code' ))
		->setDescription ( $controller->getHelper('common')->getDescription('reason_code' ))
		->setAttrib ( 'class','lock' )
		;
		
		//reason_status
		$reason_status=$this->createElement ( 'radio', 'reason_status' )
		->setLabel ( $controller->getHelper('common')->getCaption('reason_status' ))
		->setDescription ( $controller->getHelper('common')->getDescription('reason_status' ))
		->setAttrib ( 'class','lock' )
		->setMultiOptions(array(1=>'Kích hoạt',0=>'Vô hiệu'))
		->setValue(1)
		;
		
		$this->addElements ( array (
			$reason_inbound_type,
			//$reason_warehouse_group_code,
			$reason_code,
			$reason_content,
			$reason_use_company,
			$reason_status,
		) );		
		
		$controller->getHelper ( 'common' )->form ( $this );
	}
}